#pragma once
#include <cstring>
#include "Protocol.hpp"
using namespace protocol_ns;


static const char* charactor = "+-*/%&|^";

class Factory
{    
public:

    static Request CreateRequest(int num1 = int(), int num2 = int(), char oper = int())
    {
        return Request(num1, num2, oper);
    }
    static Response CreateResponse(int result = int(), int returncode = int())
    {
        return Response(result, returncode);
    }
    static Request GetRandomRequest()
    {
        int num1 = rand() % 10000;

        int num2 = rand() % 23333;

        char oper = charactor[rand() % strlen(charactor)];

        return Request(num1, num2, oper);
    }
};